#include<iostream>
#include<string>
#include<stack>
using namespace std;
stack<char>stk;
string s;
int main()
{
	cin >> s;
	bool flag = 1;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'a') {
			stk.push(s[i]);
		}
		else {
			if (stk.empty()) {
				flag = 0;
				break;
			}
			stk.pop();
		}
	}
	if (flag && stk.empty()) {
		cout << "Good" << endl;
	}
	else {
		cout << "Bad" << endl;
	}
	return 0;
}